﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TaxAssistantBase;

namespace ShiBieProject
{
    class InvoiceDetaileProductNameManage
    {
        public static void InvoiceDetaileProductNameManageList(List<InvoiiceOcrModel> idIOMList)
        {
            foreach (InvoiiceOcrModel iomodel in idIOMList) {
                if (iomodel.billtype != -1)
                {
                    string companyName = iomodel.companyName;
                    string isProviderOrCustomer = iomodel.invoiceOcrSonLists[0].isProviderOrCustomer;
                    //如果主公司为餐饮公司并且为销项票时
                }
                else {
                    foreach (InvoiceSonModel ismmodel in iomodel.invoiceOcrSonLists) {
                        string gfcompname = ismmodel.gfcompanyname;
                        string gftaxnumber = ismmodel.gftaxnumber;
                        if (string.IsNullOrEmpty(gfcompname)) {
                            ismmodel.gfcompanyname = "未识别";
                        }
                        if (string.IsNullOrEmpty(gftaxnumber))
                        {
                            ismmodel.gftaxnumber = "---";
                        }
                    }
                }
            }
        }
    }
}
